// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_QC_IQC
// * CreateDate    : 2014-06-05 18:30:29
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:29
// * LastChanger   : 2014-06-05 18:30:29
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class QcIqcEntity : EntityBase
    {
        public QcIqcTable TableSchema
        {
            get
            {
                return QcIqcTable.Current;
            }
		}
		
		public QcIqcEntity()
        {

        }
		
		public QcIqcEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.IqcNo = Convert.ToString(CommonFunctions.ToObject(dr["IQC_NO"]));
			this.PurArvNo = Convert.ToString(CommonFunctions.ToObject(dr["PUR_ARV_NO"]));
			this.PoNo = Convert.ToString(CommonFunctions.ToObject(dr["PO_NO"]));
			this.MaterialId = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_ID"]));
			this.MaterialName = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_NAME"]));
			this.MaterialCode = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_CODE"]));
			this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
			this.Type = Convert.ToString(CommonFunctions.ToObject(dr["TYPE"]));
			this.SolutionNo = Convert.ToString(CommonFunctions.ToObject(dr["SOLUTION_NO"]));
			this.SampleStd = Convert.ToString(CommonFunctions.ToObject(dr["SAMPLE_STD"]));
			this.SampleQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["SAMPLE_QTY"]));
			this.AcptQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["ACPT_QTY"]));
			this.RejQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["REJ_QTY"]));
			this.FineQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["FINE_QTY"]));
			this.NgQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["NG_QTY"]));
			this.Result = Convert.ToString(CommonFunctions.ToObject(dr["RESULT"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }
		
		public QcIqcEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.IqcNo = Convert.ToString(CommonFunctions.ToObject(dr["IQC_NO"]));
			this.PurArvNo = Convert.ToString(CommonFunctions.ToObject(dr["PUR_ARV_NO"]));
			this.PoNo = Convert.ToString(CommonFunctions.ToObject(dr["PO_NO"]));
			this.MaterialId = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_ID"]));
			this.MaterialName = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_NAME"]));
			this.MaterialCode = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_CODE"]));
			this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
			this.Type = Convert.ToString(CommonFunctions.ToObject(dr["TYPE"]));
			this.SolutionNo = Convert.ToString(CommonFunctions.ToObject(dr["SOLUTION_NO"]));
			this.SampleStd = Convert.ToString(CommonFunctions.ToObject(dr["SAMPLE_STD"]));
			this.SampleQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["SAMPLE_QTY"]));
			this.AcptQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["ACPT_QTY"]));
			this.RejQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["REJ_QTY"]));
			this.FineQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["FINE_QTY"]));
			this.NgQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["NG_QTY"]));
			this.Result = Convert.ToString(CommonFunctions.ToObject(dr["RESULT"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return QcIqcTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(QcIqcTable.C_ID)); }
            set { SetData(QcIqcTable.C_ID, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(QcIqcTable.C_CREATED_DATE)); }
            set { SetData(QcIqcTable.C_CREATED_DATE, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(QcIqcTable.C_CREATED_BY)); }
            set { SetData(QcIqcTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime UpdatedDate
        {
            get { return Convert.ToDateTime(GetData(QcIqcTable.C_UPDATED_DATE)); }
            set { SetData(QcIqcTable.C_UPDATED_DATE, value); }
        }
		
        [DataMember]
        public string UpdatedBy
        {
            get { return Convert.ToString(GetData(QcIqcTable.C_UPDATED_BY)); }
            set { SetData(QcIqcTable.C_UPDATED_BY, value); }
        }
		
        [DataMember]
        public int IsActive
        {
            get { return Convert.ToInt32(GetData(QcIqcTable.C_IS_ACTIVE)); }
            set { SetData(QcIqcTable.C_IS_ACTIVE, value); }
        }
		
        [DataMember]
        public string IqcNo
        {
            get { return Convert.ToString(GetData(QcIqcTable.C_IQC_NO)); }
            set { SetData(QcIqcTable.C_IQC_NO, value); }
        }
		
        [DataMember]
        public string PurArvNo
        {
            get { return Convert.ToString(GetData(QcIqcTable.C_PUR_ARV_NO)); }
            set { SetData(QcIqcTable.C_PUR_ARV_NO, value); }
        }
		
        [DataMember]
        public string PoNo
        {
            get { return Convert.ToString(GetData(QcIqcTable.C_PO_NO)); }
            set { SetData(QcIqcTable.C_PO_NO, value); }
        }
		
        [DataMember]
        public string MaterialId
        {
            get { return Convert.ToString(GetData(QcIqcTable.C_MATERIAL_ID)); }
            set { SetData(QcIqcTable.C_MATERIAL_ID, value); }
        }
		
        [DataMember]
        public string MaterialName
        {
            get { return Convert.ToString(GetData(QcIqcTable.C_MATERIAL_NAME)); }
            set { SetData(QcIqcTable.C_MATERIAL_NAME, value); }
        }
		
        [DataMember]
        public string MaterialCode
        {
            get { return Convert.ToString(GetData(QcIqcTable.C_MATERIAL_CODE)); }
            set { SetData(QcIqcTable.C_MATERIAL_CODE, value); }
        }
		
        [DataMember]
        public decimal Qty
        {
            get { return Convert.ToDecimal(GetData(QcIqcTable.C_QTY)); }
            set { SetData(QcIqcTable.C_QTY, value); }
        }
		
        [DataMember]
        public string Type
        {
            get { return Convert.ToString(GetData(QcIqcTable.C_TYPE)); }
            set { SetData(QcIqcTable.C_TYPE, value); }
        }
		
        [DataMember]
        public string SolutionNo
        {
            get { return Convert.ToString(GetData(QcIqcTable.C_SOLUTION_NO)); }
            set { SetData(QcIqcTable.C_SOLUTION_NO, value); }
        }
		
        [DataMember]
        public string SampleStd
        {
            get { return Convert.ToString(GetData(QcIqcTable.C_SAMPLE_STD)); }
            set { SetData(QcIqcTable.C_SAMPLE_STD, value); }
        }
		
        [DataMember]
        public decimal SampleQty
        {
            get { return Convert.ToDecimal(GetData(QcIqcTable.C_SAMPLE_QTY)); }
            set { SetData(QcIqcTable.C_SAMPLE_QTY, value); }
        }
		
        [DataMember]
        public decimal AcptQty
        {
            get { return Convert.ToDecimal(GetData(QcIqcTable.C_ACPT_QTY)); }
            set { SetData(QcIqcTable.C_ACPT_QTY, value); }
        }
		
        [DataMember]
        public decimal RejQty
        {
            get { return Convert.ToDecimal(GetData(QcIqcTable.C_REJ_QTY)); }
            set { SetData(QcIqcTable.C_REJ_QTY, value); }
        }
		
        [DataMember]
        public decimal FineQty
        {
            get { return Convert.ToDecimal(GetData(QcIqcTable.C_FINE_QTY)); }
            set { SetData(QcIqcTable.C_FINE_QTY, value); }
        }
		
        [DataMember]
        public decimal NgQty
        {
            get { return Convert.ToDecimal(GetData(QcIqcTable.C_NG_QTY)); }
            set { SetData(QcIqcTable.C_NG_QTY, value); }
        }
		
        [DataMember]
        public string Result
        {
            get { return Convert.ToString(GetData(QcIqcTable.C_RESULT)); }
            set { SetData(QcIqcTable.C_RESULT, value); }
        }
		
        [DataMember]
        public string Remark
        {
            get { return Convert.ToString(GetData(QcIqcTable.C_REMARK)); }
            set { SetData(QcIqcTable.C_REMARK, value); }
        }
		
        [DataMember]
        public string Status
        {
            get { return Convert.ToString(GetData(QcIqcTable.C_STATUS)); }
            set { SetData(QcIqcTable.C_STATUS, value); }
        }
		
		#endregion
	}
	
	
}	

